home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
LIFE6__
/
PROTO
/
P
/
PCOMMONL.H
< prev
next >
Wrap
Text File
|
1991-08-16
|
13KB
|
257 lines
/* PCommonLife6 Common
Name: PCommonLife6.h
Function: Common for the Prototyper specific code.
History: 8/16/91 Original by Prototyper 3.0
*/
/* ======================================================= */
/* ======================================================= */
/* Basic definitions */
#define NIL 0L /* Used for empty pointers and handles */
/* User event definitions */
#define UserEvent_None 0 /* No user events available */
#define UserEvent_Open_Window 1 /* Open Window or modeless dialog */
#define UserEvent_Close_Window 2 /* Close Window or modeless dialog */
/* IDs 0 to 999 reserved for Prototyper, all others available for special use */
/* Menu list resource IDs */
#define Res_Menu_Apple 256 /* Menu resource ID */
#define MItem_About_Life 1
#define Res_Menu_File 257 /* Menu resource ID */
#define MItem_New 1
#define MItem_Open 2
#define MItem_Close 4
#define MItem_Save 5
#define MItem_Save_As 6
#define MItem_Revert_to_Saved 7
#define MItem_Page_Setup 9
#define MItem_Print 10
#define MItem_Quit 12
#define Res_Menu_Edit 258 /* Menu resource ID */
#define MItem_Undo 1
#define MItem_Cut 3
#define MItem_Copy 4
#define MItem_Paste 5
#define MItem_Clear 6
#define MItem_Select_All 7
#define MItem_Show_Clipboard 9
#define Res_Menu_Life_Stuff 259 /* Menu resource ID */
#define MItem_Reset 1
#define MItem_Continuous 2
/* Window resource IDs, also controls grouped with the appropiate window */
#define Res_D_About_Life 257 /* Modal Dialog */
#define Res_Dlg_Big_Deal 1 /* ...Button */
/* Static text item Static_Text is 2 */
#define Res_W_Life_4a 256 /* Window */
#define Res_Ctrl_GO 255 /* ...Button */
#define Res_Ctrl_Rect_hotspot1_1 257 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_2 258 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_3 259 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_4 260 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_5 261 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_6 262 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_7 263 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot1_8 264 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_1 265 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_2 266 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_3 267 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_4 268 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_5 269 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_6 270 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_7 271 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot2_8 272 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_1 273 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_2 274 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_3 275 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_4 276 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_5 277 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_6 278 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_7 279 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot3_8 280 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_1 281 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_2 282 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_3 283 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_4 284 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_52 285 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_6 286 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_7 287 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot4_8 288 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_1 289 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_2 290 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_3 291 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_4 292 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_5 293 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_6 294 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_7 295 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot5_8 296 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_1 297 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_2 298 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_3 299 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_4 300 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_5 301 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_6 302 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_7 303 /* ...HotSpot */
#define Res_Ctrl_Rect_hotspot6_8 304 /* ...HotSpot */
#define Res_Ctrl_Static_Text 313 /* ...String of text */
#define Res_Ctrl_Static_Text2 314 /* ...String of text */
#define Res_Ctrl_Static_Text3 315 /* ...String of text */
/* ======================================================= */
typedef struct UserEventRec{ /* User Event Record definition */
short ID; /* ID for the type of user event */
short ID2; /* Optionally used, 2nd ID, sometimes used */
long Data1; /* Optionally used, Extra data */
long Data2; /* Optionally used, Extra data */
Handle theHandle; /* Optionally used, Handle */
struct UserEventRec **Next; /* Handle of next event in the list */
}UserEventRec,*UserEventPRec,**UserEventHRec;
extern UserEventHRec UserEventList; /* User Event record list start */
extern EventRecord myEvent; /* Event record for all events */
extern Boolean WNE; /* WaitNextEvent trap is available */
extern short SleepValue; /* Sleep value for Wait on events */
extern Boolean doneFlag; /* Exit program flag */
extern TEHandle theInput; /* Used in text edit selections */
extern Rect tempRect; /* Temporary rect, not for long term use */
extern Str255 sTemp; /* Temporary string, not for long term use */
extern Boolean HasColorQD; /* Flag for Color QuickDraw being available */
extern Boolean HasFPU; /* Flag for Floating Point Math Chip being available */
extern Boolean InTheForeground; /* Flag for running in MultiFinder foreground */
extern short tempChar; /*Temporary use character*/
extern MenuHandle Menu_Apple; /* Menu handle */
extern MenuHandle Menu_File; /* Menu handle */
extern MenuHandle Menu_Edit; /* Menu handle */
extern MenuHandle Menu_Life_Stuff; /* Menu handle */
/* Variables for the modal dialog titled "About Life" */
/* Window variables for the window titled "Life 4a" */
extern WindowPtr WPtr_Life_4a; /* Window pointer */
extern ControlHandle Ctrl_GO; /* ...Button */
extern ControlHandle Ctrl_Rect_hotspot1_1; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_1;
extern ControlHandle Ctrl_Rect_hotspot1_2; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_2;
extern ControlHandle Ctrl_Rect_hotspot1_3; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_3;
extern ControlHandle Ctrl_Rect_hotspot1_4; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_4;
extern ControlHandle Ctrl_Rect_hotspot1_5; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_5;
extern ControlHandle Ctrl_Rect_hotspot1_6; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_6;
extern ControlHandle Ctrl_Rect_hotspot1_7; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_7;
extern ControlHandle Ctrl_Rect_hotspot1_8; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot1_8;
extern ControlHandle Ctrl_Rect_hotspot2_1; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_1;
extern ControlHandle Ctrl_Rect_hotspot2_2; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_2;
extern ControlHandle Ctrl_Rect_hotspot2_3; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_3;
extern ControlHandle Ctrl_Rect_hotspot2_4; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_4;
extern ControlHandle Ctrl_Rect_hotspot2_5; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_5;
extern ControlHandle Ctrl_Rect_hotspot2_6; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_6;
extern ControlHandle Ctrl_Rect_hotspot2_7; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_7;
extern ControlHandle Ctrl_Rect_hotspot2_8; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot2_8;
extern ControlHandle Ctrl_Rect_hotspot3_1; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_1;
extern ControlHandle Ctrl_Rect_hotspot3_2; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_2;
extern ControlHandle Ctrl_Rect_hotspot3_3; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_3;
extern ControlHandle Ctrl_Rect_hotspot3_4; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_4;
extern ControlHandle Ctrl_Rect_hotspot3_5; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_5;
extern ControlHandle Ctrl_Rect_hotspot3_6; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_6;
extern ControlHandle Ctrl_Rect_hotspot3_7; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_7;
extern ControlHandle Ctrl_Rect_hotspot3_8; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot3_8;
extern ControlHandle Ctrl_Rect_hotspot4_1; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_1;
extern ControlHandle Ctrl_Rect_hotspot4_2; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_2;
extern ControlHandle Ctrl_Rect_hotspot4_3; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_3;
extern ControlHandle Ctrl_Rect_hotspot4_4; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_4;
extern ControlHandle Ctrl_Rect_hotspot4_52; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_52;
extern ControlHandle Ctrl_Rect_hotspot4_6; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_6;
extern ControlHandle Ctrl_Rect_hotspot4_7; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_7;
extern ControlHandle Ctrl_Rect_hotspot4_8; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot4_8;
extern ControlHandle Ctrl_Rect_hotspot5_1; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_1;
extern ControlHandle Ctrl_Rect_hotspot5_2; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_2;
extern ControlHandle Ctrl_Rect_hotspot5_3; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_3;
extern ControlHandle Ctrl_Rect_hotspot5_4; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_4;
extern ControlHandle Ctrl_Rect_hotspot5_5; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_5;
extern ControlHandle Ctrl_Rect_hotspot5_6; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_6;
extern ControlHandle Ctrl_Rect_hotspot5_7; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_7;
extern ControlHandle Ctrl_Rect_hotspot5_8; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot5_8;
extern ControlHandle Ctrl_Rect_hotspot6_1; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_1;
extern ControlHandle Ctrl_Rect_hotspot6_2; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_2;
extern ControlHandle Ctrl_Rect_hotspot6_3; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_3;
extern ControlHandle Ctrl_Rect_hotspot6_4; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_4;
extern ControlHandle Ctrl_Rect_hotspot6_5; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_5;
extern ControlHandle Ctrl_Rect_hotspot6_6; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_6;
extern ControlHandle Ctrl_Rect_hotspot6_7; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_7;
extern ControlHandle Ctrl_Rect_hotspot6_8; /* ...HotSpot or Rect*/
extern Rect HotRect_Rect_hotspot6_8;
/* ======================================================= */